import { useVisaStore } from '@/store/modules/visa/index.js'
import { isEmpty } from '@/utils/common/is.js'
export const TypeIndex = index => {
  const _index = {
    0: '一',
    1: '二',
    2: '三',
    3: '四',
    4: '五',
    5: '六',
    5: '七',
    5: '八',
    5: '九'
  }
  return _index[index]
}

export const getCityName = id => {
  const consulateCityList = !isEmpty(useVisaStore().consulateCityList)
    ? useVisaStore().consulateCityList
    : window.localStorage.getItem('consulateCityList') && JSON.parse(window.localStorage.getItem('consulateCityList'))
  let cityName = ''
  console.log('%c [ consulateCityList ]-20', 'font-size:13px; background:#8c1da3; color:#d061e7;', consulateCityList)

  consulateCityList.forEach(val => {
    if (val.city_id == id) {
      cityName = val.name
    }
  })
  return cityName
}
